﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ListVolunteeringOpportunity.ascx.cs" 
Inherits="AB.ServiceDirectory.Design.WebUserControls.Frame.ListVolunteeringOpportunity" %>
<script type="text/javascript">
    function Confirm_Active() {
        return confirm('Do you want active this Colunteer');
    }
</script>
<asp:Panel ID="PanelDirectorateList" runat="server" Visible="true">
    <div class="titleh">
        <h3 class="sorting_range">
            <asp:LinkButton ID="LinkButtonAll" runat="server" CssClass="hg-blue" CommandName="all"
                OnCommand="FilterByLetters_Command" CausesValidation="False" 
                ClientIDMode="Static">All</asp:LinkButton>
            <asp:LinkButton ID="LinkButton09" runat="server" CommandName="09" 
                OnCommand="FilterByLetters_Command" CausesValidation="False" 
                ClientIDMode="Static">0-9</asp:LinkButton>
            <asp:LinkButton ID="LinkButtonAE" runat="server" CommandName="ae" 
                OnCommand="FilterByLetters_Command" CausesValidation="False" 
                ClientIDMode="Static">A B C D E</asp:LinkButton>
            <asp:LinkButton ID="LinkButtonFJ" runat="server" CommandName="fj" 
                OnCommand="FilterByLetters_Command" CausesValidation="False" 
                ClientIDMode="Static">F G H I J</asp:LinkButton>
            <asp:LinkButton ID="LinkButtonKN" runat="server" CommandName="kn" 
                OnCommand="FilterByLetters_Command" CausesValidation="False" 
                ClientIDMode="Static">K L M N </asp:LinkButton>
            <asp:LinkButton ID="LinkButtonOR" runat="server" CommandName="or" 
                OnCommand="FilterByLetters_Command" CausesValidation="False" 
                ClientIDMode="Static">O P Q R</asp:LinkButton>
            <asp:LinkButton ID="LinkButtonSV" runat="server" CommandName="sv" 
                OnCommand="FilterByLetters_Command" CausesValidation="False" 
                ClientIDMode="Static">S T U V</asp:LinkButton>
            <asp:LinkButton ID="LinkButtonWZ" CssClass="last" runat="server" CommandName="wz"
                OnCommand="FilterByLetters_Command" CausesValidation="False" 
                ClientIDMode="Static">W X Y Z</asp:LinkButton>
            <span class="right">
                <asp:LinkButton ID="LinkButtonCreate" runat="server" CssClass="hg-blue" 
                onclick="LinkButtonCreate_Click" CausesValidation="False">Create</asp:LinkButton>
                <asp:CheckBox ID="CheckBoxInactive" runat="server" Text="Include In-active" AutoPostBack="True"
                    OnCheckedChanged="CheckBoxInactive_CheckedChanged" />
            </span>
        </h3>
    </div>
    <asp:GridView DataSourceID="ObjectDataSourceDirectorate" ID="GridViewDirectorate"
        CssClass="tablesorter" runat="server" AutoGenerateColumns="False" AllowPaging="True"
        PageSize="15" AllowSorting="True">
        <Columns>
            <asp:TemplateField HeaderText="Contact" SortExpression="ContactName">
                <ItemTemplate>
                    <asp:LinkButton ID="LinkButtonDirectorateName" CausesValidation="false" runat="server" CommandName='<%# Eval("ContactId") %>' CommandArgument='<%#Eval("IsActive") %>'
                        OnClientClick='<%# !(bool)Eval("IsActive") ? "return Confirm_Active();" : string.Empty %>' ><%# Eval("ContactName") %></asp:LinkButton>
                </ItemTemplate>
                <HeaderStyle CssClass="header" Width="157px"/>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Purpose" SortExpression="Purpose">
                <ItemTemplate>
                    <%#Eval("Purpose")%>
                </ItemTemplate>
                <HeaderStyle CssClass="header" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Number" SortExpression="Number">
                <ItemTemplate>
                    <%#Eval("Number")%>
                </ItemTemplate>
                <HeaderStyle CssClass="header" Width="150px"/>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Start Date" SortExpression="StartDate">
                <ItemTemplate>
                   <%#Eval("StartDate")%>
                </ItemTemplate>
                <HeaderStyle CssClass="header" Width="112px"/>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="End Date" SortExpression="EndDate">
                <ItemTemplate>
                    <%#Eval("EndDate")%>
                </ItemTemplate>
                <HeaderStyle CssClass="header" Width="112px"/>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="Is Active?" SortExpression="IsActive">
                <ItemTemplate>
                    <%#(bool) Eval("IsActive") ? "Yes" : "No"%>
                </ItemTemplate>
                <HeaderStyle CssClass="header" Width="85px"/>
            </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
                        <blockquote>There are no items to show.</blockquote>
                    </EmptyDataTemplate>
        <PagerStyle CssClass="pagination_table"></PagerStyle>
    </asp:GridView>
    <%--<asp:ObjectDataSource ID="ObjectDataSourceDirectorate" runat="server" SelectMethod="GetDirectorateList"
        TypeName="AB.ServiceDirectory.BO.DirectorateBO" OnSelecting="ObjectDataSourceDirectorate_Selecting"
        EnablePaging="true" SelectCountMethod="GetListCount" StartRowIndexParameterName="startRowIndex"
        MaximumRowsParameterName="maxRows" SortParameterName="sortType">
        <SelectParameters>
            <asp:Parameter Name="filter" Type="Object" ConvertEmptyStringToNull="False" />
        </SelectParameters>
    </asp:ObjectDataSource>--%>
</asp:Panel>